package br.com.globalcode.clinicafacil.apresentacao;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class AdicionaPaciente
 */
@WebServlet(urlPatterns= {"/paciente/add"}, loadOnStartup=1)
public class AdicionaPaciente extends HttpServlet {
	
	private static final long serialVersionUID = 1L;
       
    /**
     * 
     * @see HttpServlet#HttpServlet()
     */
    public AdicionaPaciente() {
        super();
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request
						, HttpServletResponse response) 
								throws ServletException
								     , IOException {
	
		
		PrintWriter out = response.getWriter();
		out.println("<html>");
		out.println("\t<body>");
		out.println("\t\t<h1>Caraca .. a galera pira ... </h1>");
		out.println("\t\t<h1> " +  request.getContextPath()  + "</h1>");
		out.println("\t\t<h1> " +  request.getServletPath()  + "</h1>");
		out.println("\t\t<h1> " +  request.getServerName()  + "</h1>");
		out.println("\t\t<h1> " +  request.getServerPort()  + "</h1>");
		out.println("\t\t<h1> " +  request.getHeader("User-Agent")  + "</h1>");
		out.println("\t</body>");
		out.println("</html>");
		
	
	}

}
